namespace ConnectionFactory
{
    using System;
    using System.Data;

    public class DefaultConnectionFactory : IDbConnectionFactory
    {
        // Methods
        public DefaultConnectionFactory(Type connectionType, string connectionString)
        {
            this.connectionType = connectionType;
            this.connectionString = connectionString;
        }

        public IDbConnection CreateConnection()
        {
            object[] objArray1 = new object[] { this.connectionString } ;
            return (IDbConnection) Activator.CreateInstance(this.connectionType, objArray1);
        }


        // Fields
        private string connectionString;
        private Type connectionType;
    }
}

